import java.io.Serializable;

/**
 * This is the leader of the party in Oregon Trail. Holds the money, and won't
 * die unless the rest of the party has already died. Also, the leader has a
 * profession that dictates the amount of starting money and other events, such
 * as whether or not he/she is able to fix the wagon should a part break.
 */
public class PartyLeader extends PartyMember implements Serializable
{
	private Profession playerProf;
	private int money;
	
	/**
	 * Creates a party leader. 
	 * 
	 * @param name The player's name
	 * @param p The player's chosen profession
	 */
	public PartyLeader(String name, Profession p)
	{
		super(name);
		playerProf = p;
		money = p.getStartMoney();
	}
	
	/**
	 * Accessor for the money field.
	 * @return Player's current money.
	 */
	public int getMoney()
	{
		return money;
	}
	
	/**
	 * Adds money to the player's current money.
	 * @param a Amount by which we increase the player's money. May be positive or negative.
	 */
	public void addMoney(int a)
	{
		money += a;
	}

	/**
	 * Accessor for the player's profession.
	 * @return The player's profession.
	 */
	public Profession getPlayerProf()
	{
		return playerProf;
	}
}